// 一个用于查找所有子分类的辅助函数
export const findAllSubCategories = (category) => {
    const result = [category];

    const findChildren = (parentId) => {
        const children = categories.value.filter(item => item.part_of === parentId);
        children.forEach(child => {
            result.push(child);
            findChildren(child.id);
        });
    }

    findChildren(category.id);
    return result;
}
